package com.richmond.gui.bilan;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.net.URL;

/**
 * User: csavard
 * Date: 12-08-07
 * Time: 09:47
 */
public class BilanApp extends Application {
    public BilanApp() {
        super();
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        try {
            primaryStage.setTitle("Bilan");
            URL formUrl = getClass().getClassLoader().getResource("com/richmond/gui/BilanForm.fxml");
            URL cssUrl = getClass().getClassLoader().getResource("com/richmond/gui/Bilan.css");

            Parent root = FXMLLoader.load(formUrl);
            root.getStylesheets().add(cssUrl.toString());
            primaryStage.setScene(new Scene(root));
            primaryStage.show();
        } catch (Throwable e) {
            e.printStackTrace();
            throw e;
        }
    }

    @Override
    public void stop() throws Exception {
        super.stop();
        System.exit(0);
    }

    public static void main(String arg[]) {
        try {
            new BilanController();
            launch(arg);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
